package dnl.util.ui.mdi;

import java.awt.Dimension;
import java.awt.Rectangle;

import javax.swing.JDesktopPane;
import javax.swing.Scrollable;

public class ScrollableDesktopPane extends JDesktopPane implements Scrollable {
	@Override
	public Dimension getPreferredScrollableViewportSize() {
		return getPreferredSize();
	}

	@Override
	public int getScrollableUnitIncrement(Rectangle r, int axis, int dir) {
		return 50;
	}

	@Override
	public int getScrollableBlockIncrement(Rectangle r, int axis, int dir) {
		return 200;
	}

	@Override
	public boolean getScrollableTracksViewportWidth() {
		return false;
	}

	@Override
	public boolean getScrollableTracksViewportHeight() {
		return false;
	}

}